Repository navigation
fix(format): compare JSON numbers exactly - #240
Merged
helloml0326 merged 1 commit intoNov 16, 2026
Merged
Conversation
helloml0326
approved these changes
Nov 16, 2026
helloml0326
approved these changes
Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenJudge Version
0.2.5, main
5d737c9.Description
JsonMatchGradergives a perfect match for1.0000000000000001versus1.0, or1e400versus2e400, becausejson.loadsrounds fractional/exponent values to binary floats before comparison. Conversely, the equivalent values9007199254740993and9007199254740993.0do not match.Parse fractional/exponent tokens with standard-library
Decimalin both inputs. Keep integers, recursive comparison, unordered matching, boolean distinction and rejection of non-JSON NaN/Infinity literals unchanged. Parsed numbers remain internal; the returned score and metadata stay JSON-serializable.Validation:
aevaluateregressions on unchanged main: 12 failed, 85 passed.pre-commit run --all-files --verbose: all hooks pass, including configured pytest 1263 passed, 139 skipped, five existing NumPy zero-variance warnings.git diff --check: passed.Tests cover nested ordered/unordered values, precision loss, overflow/underflow, integer/decimal equivalence, signed zero and boolean controls. No models, providers or service substitutes were used. Configured exclusions are multimodal/generator/data/examples; skipped provider tests did not run. Existing #232 rejects nonstandard literals; this fixes valid JSON numbers. #238 concerns the separate text NumberAccuracyGrader.
AI assistance: OpenAI Codex prepared the patch and ran validation.
Checklist
pre-commit run --all-files.